<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="salab.bean.H1N1Incident"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="view.css" media="all">
<script type="text/javascript" src="view.js"></script>
<script	type="text/javascript" src="calendar.js"></script>
<title>Search</title>
</head>
<%
	List<H1N1Incident> results = (List<H1N1Incident>)request.getSession().getAttribute( "search_result" );
	if( results == null )
	{
		results = new ArrayList<H1N1Incident>();
	}
%>

<body id="main_body">
<img id="top" src="top.png" alt=""/>
<div id="form_container">

<h1><a>Incident Reporting Form</a></h1>
<form id="searchForm" class="appnitro" method="post" action="IncidentSearchHandler">
<div class="form_description">
<h2>Incident Search Form</h2>
<p>Use this form to search an incident on H1N1 influenza</p>
</div>

<ul>

<li id="li_1"><label class="description" for="element_1">Incident Id</label>
	<div><input id="incidentid" name="incidentid" class="element text medium"
		type="text" maxlength="150" value="" /></div>
</li>

<li id="li_7"><label class="description" for="element_12">From Date</label><span> <input id="element_7_1"
		name="element_7_1" class="element text" size="2" maxlength="2"
		value="" type="text"> / <label for="element_7_1">MM</label></span> <span>
	<input id="element_7_2" name="element_7_2" class="element text"
		size="2" maxlength="2" value="" type="text"> / <label
		for="element_7_2">DD</label></span> <span> <input id="element_7_3"
		name="element_7_3" class="element text" size="4" maxlength="4"
		value="" type="text"> <label for="element_7_3">YYYY</label></span> <span
		id="calendar_7"> <img id="cal_img_7" class="datepicker"
		src="calendar.gif" alt="Pick a date."></span> <script
		type="text/javascript">
			Calendar.setup({
			inputField	 : "element_7_3",
			baseField    : "element_7",
			displayArea  : "calendar_7",
			button		 : "cal_img_7",
			ifFormat	 : "%B %e, %Y",
			onSelect	 : selectDate
			});
		</script></li>
		
	<li id="li_8"><label class="description" for="element_12">To Date</label><span> <input id="element_8_1"
		name="element_8_1" class="element text" size="2" maxlength="2"
		value="" type="text"> / <label for="element_8_1">MM</label></span> <span>
	<input id="element_8_2" name="element_8_2" class="element text"
		size="2" maxlength="2" value="" type="text"> / <label
		for="element_8_2">DD</label></span> <span> <input id="element_8_3"
		name="element_8_3" class="element text" size="4" maxlength="4"
		value="" type="text"> <label for="element_8_3">YYYY</label></span> <span
		id="calendar_8"> <img id="cal_img_8" class="datepicker"
		src="calendar.gif" alt="Pick a date."></span> <script
		type="text/javascript">
			Calendar.setup({
			inputField	 : "element_8_3",
			baseField    : "element_8",
			displayArea  : "calendar_8",
			button		 : "cal_img_8",
			ifFormat	 : "%B %e, %Y",
			onSelect	 : selectDate
			});
		</script></li>
		
		<li class="buttons"><input type="hidden" name="form_id"
		value="199158" /> <input id="saveForm" class="button_text"
		type="submit" name="submit" value="Search" /></li>

</ul>
</form>

<div style="margin: 20px;">
<table border="1" width="375px">
<thead>
<tr>
	<th>Incident ID</th>
	<th>Area</th>
</tr>
<%
	for( H1N1Incident incident : results )
	{
%>
	<tr>
		<td><a href="#"><%=incident.getIncidentId() %></a></td>
		<td><%=incident.getArea() %></td>
	</tr>
<%
	}
%>
</thead>
</table>
</div>

</div>
</html>